home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: mskc@io.com (Casey Claiborne)
- Newsgroups: comp.lang.c,comp.lang.c.moderated
- Subject: Leading and Trailing Blanks
- Date: 4 Jan 1996 15:32:27 -0600
- Organization: Illuminati Online
- Sender: clc@solutions.solon.com
- Approved: clc@solutions.solon.com
- Message-ID: <4chh1b$685@solutions.solon.com>
- NNTP-Posting-Host: solutions.solon.com
-
-
- Hello -
- I am wondering if anyone out there has a program (or knows of one)
- that allows one to strip leading and trailing blanks from a string.
- ex:
-
- char test[20];
- strcpy(test," TESTING ");
- printf("%s", test);
-
- will produce an output like
- TESTING
-
- that has blanks at the beginning of "TESTING". I would like to
- have the following result
-
- TESTING
-
- that has no leading blanks.
-
- I would *greatly* appreciate any type of help or hints in working with
- this.
-
- I'll be looking out here, but e-mails are also appreciated :)
-
- TIA
-
- Casey
-